package com.fenghongzhang.day016;

import androidx.appcompat.app.AppCompatActivity;

import android.app.Application;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import java.util.HashMap;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    public void send(View view) {


        MyApp myApp = (MyApp) getApplication();
        myApp.name = "大明";

        HashMap<String, Object> map = new HashMap<>();
        map.put("name","小明");
        map.put("name1","小明");
        map.put("name2","小明");
        map.put("name3","小明");
        map.put("name4","小明");


        HashMap<String, Object> map1 = new HashMap<>();
        map1.put("name","小明");
        map1.put("name1","小明");
        map1.put("name2","小明");
        map1.put("name3","小明");
        map1.put("name4","小明");
        myApp.list.add(map1);

        Intent intent = new Intent(this, Main2Activity.class);

        startActivity(intent);
    }
}
